package org.example;

import java.util.Objects;
import java.util.Scanner;

/**
 * @author 宋孟林
 * @description create: 2025/2/28 14:14
 */

class  TestInput {
    private static final String GAME_MOST = "豹子";
    private static final String GAME_BIG = "大";
    private static final String GAME_LITTLE = "小";
    public static void main(String[] args) {
        int su1 = (int)(Math.random() * 6) + 1;
        int su2 = (int)(Math.random() * 6) + 1;
        int su3 = (int)(Math.random() * 6) + 1;
        Scanner scan = new Scanner(System.in);
        System.out.print("请压宝（豹子、大、小）：");
        String chance = scan.nextLine();
        String re;
        if (Objects.equals(chance, GAME_MOST)){
            re = "a";
        }else if (Objects.equals(chance, GAME_BIG)){
            re = "b";
        }else if (Objects.equals(chance, GAME_LITTLE)){
            re = "c";
        }else {
            re = "d";
        }
        scan.close();
        boolean result = false;
        switch(re){
            case "a":{
                result = su1 == su2 && su2 == su3;
                break;
            }
            case "b":{
                result = su1 + su2 + su3 > 9;
                break;
            }
            case "c":{
                result = su1 + su2 + su3 < 9;
                break;
            }
            default:System.out.println("输入有误！");
        }
        System.out.println("a,b,c分别是：" + su1 +"," + su2 +"," + su3 );
        System.out.println(result ? "猜中了" : "猜错了");
    }
}